from symtable import Class
from rest_framework import serializers

from category.models import CategoryModel


class Category(serializers.ModelSerializer):
    class Meta:
        model = CategoryModel
        fields = '__all__'
class CategorySerializer(serializers.ModelSerializer):
    children=Category(many=True)
    class Meta:
        model = CategoryModel
        fields = '__all__'


